package cn.scw.project.facility.mapper;

import cn.scw.project.facility.domain.FacPrintOrder;
import cn.scw.project.facility.domain.netework.bean.FacPrintOrderListReq;
import cn.scw.project.facility.domain.vo.FacPrintOrderVo;
import cn.scw.project.system.domain.SysDealer;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 打印订单Mapper接口
 *
 * @author api
 * @date 2020-05-20
 */
public interface FacPrintOrderMapper {
    /**
     * 查询打印订单
     *
     * @param id 打印订单ID
     * @return 打印订单
     */
    public FacPrintOrder selectFacPrintOrderById(Long id);

    FacPrintOrderVo selectFacPrintOrderVoById(Long id);

    /**
     * 查询打印订单列表
     *
     * @param req 打印订单
     * @return 打印订单集合
     */
    public List<FacPrintOrderVo> selectFacPrintOrderList(FacPrintOrderListReq req);

    List<FacPrintOrderVo> selectFacPrintOrderListByUser(@Param("uesrId") Long userId);


    /**
     * 新增打印订单
     *
     * @param facPrintOrder 打印订单
     * @return 结果
     */
    public int insertFacPrintOrder(FacPrintOrder facPrintOrder);

    /**
     * 修改打印订单
     *
     * @param facPrintOrder 打印订单
     * @return 结果
     */
    public int updateFacPrintOrder(FacPrintOrder facPrintOrder);

    /**
     * 修改打印订单
     *
     * @param facPrintOrder 打印订单设备清零处理接口
     * @return 结果
     */
    public int updateFacPrintOrderReset(FacPrintOrder facPrintOrder);


    /**
     * 删除打印订单
     *
     * @param id 打印订单ID
     * @return 结果
     */
    public int deleteFacPrintOrderById(Long id);

    /**
     * 批量删除打印订单
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteFacPrintOrderByIds(Long[] ids);

    FacPrintOrder selectFacPrintOrderByNumber(String number);

    double countAll(SysDealer dealer);

    double countAllByDealer(SysDealer sysDealer);

    List<FacPrintOrderVo> selectFacPrintOrderPrintList(@Param("code") String code);

    List<FacPrintOrder> selectUnSharingFacPrintOrderList();
}
